<template>
  <div class="pages-contain-view">
    <el-card>
      <json-editor :editContent="jsonObj" @codeToJson="showJson"></json-editor>
    </el-card>
  </div>
</template>

<script>
import JsonEditor from "@/components/jsonEditor";
const defaultJson = "{a:1,b:'second',c:3,d:'四'}";
export default {
  components: {
    JsonEditor
  },
  data() {
    return {
      jsonObj: {
        data: defaultJson
      }
    };
  },
  methods: {
    showJson(data) {
      this.jsonObj.data = data;
    }
  }
};
</script>

<style scoped>
</style>